/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mapper;

import connectdatabase.DBConnect;
import java.sql.Connection;

/**
 *
 * @author Haomaru
 */
public class DBMapper {
   
    private Connection connection;
	public DBMapper() throws Exception {
		try {
			connection = DBConnect.DBConnect();
		}
		catch (Exception e) {
			System.out.println(e.toString());
			throw e;
		}
	}
	
	public Connection getConnection() {
		return connection;
	}
	
	public void closeConnection() throws Exception {
		try {
			getConnection().close();
		}
		catch (Exception e) {
			System.out.println(e.toString());
			throw e;
		}
	}
}
